home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / mail / mailhand / email-pa.000 / email-pa / email-pager / chat-source / README < prev   
Text File  |  1994-05-25  |  6KB  |  170 lines

  1. I run PPP between crappie.morningstar.com (137.175.6.3, my home
  2. machine) and remora.morningstar.com (137.175.2.7, my workstation at
  3. the office).  This document describes how I use it.  The installation
  4. of PPP itself is covered in the PPP distribution.
  5.  
  6. I put a line like this in remora's /etc/passwd:
  7.  
  8.  Pkarl:2y4613BDaQD3x:51:10:Karl's PPP login:/tmp:/usr/local/etc/pppstart
  9.  
  10. I created a login shell script on remora called
  11. /usr/local/etc/pppstart:
  12.  
  13.  #!/bin/sh
  14.  /usr/bin/mesg n
  15.  stty -tostop
  16.  exec /usr/local/etc/ppp 137.175.2.7:
  17.  
  18. I use the ppp-on command to bring up a connection, and ppp-off to shut
  19. it down.  These shell scripts, plus the unlock and fix-cua scripts and
  20. the source to the chat program are included.  You will need to heavily
  21. modify these to suit your own situation, including Internet addresses,
  22. machine names, telephone numbers, modem dialing commands, baud rates,
  23. login names and passwords.  Make the "ppp..." command in the ppp-on
  24. script look something like this:
  25.  
  26.  ppp 137.175.6.3: /dev/cua &
  27.  
  28. The "137.175.6.3:" is of the format "local-addr:remote-addr" with the
  29. remote address null (it will be negotiated by PPP).  Look at the login
  30. shell script above; it can be common to all dial-in PPP users on your
  31. machine because it only specifies the address of the remora
  32. (receiving) end of the link.
  33.  
  34. If you use the enclosed chat and unlock programs, be sure they are
  35. suid uucp, and fix-cua should be suid root.  The ppp-on script should
  36. be chmod 700, owner yourself, to keep the password (semi-) secure.
  37.  
  38. I use the following eeprom settings and /dev and /etc/ttytab entries
  39. in order to support dial-in and dial-out on a single phone line:
  40.  
  41.  crappie 12% eeprom | grep ttya
  42.  ttya-mode=19200,8,1,n,h
  43.  ttya-rts-dtr-off=false
  44.  ttya-ignore-cd=false
  45.  crappie 13% ls -lg /dev/cua /dev/ttya
  46.  crw-rw-rw-  1 root     staff     12, 128 Nov 20 09:14 /dev/cua
  47.  crw--w--w-  1 root     wheel     12,   0 Nov 20 08:25 /dev/ttya
  48.  crappie 14% grep ttya /etc/ttytab
  49.  ttya    "/usr/etc/getty std.19200"      unknown         on
  50.  crappie 15%
  51.  
  52. On SunOS 4.1 and later, make sure that the /etc/ttytab line for ttya
  53. doesn't say "local":
  54.  
  55.   ttya    "/usr/etc/getty std.38400"    unknown        on
  56.  
  57. Make sure your modem passes data transparently; watch out especially
  58. for ^S, ^Q, ^P (UUCP spoofing) and parity problems.  I have a Telebit
  59. Trailblazer+ attached to /dev/ttya with the following register
  60. settings:
  61.  
  62.  aaatz
  63.  OK
  64.  aat&n
  65.  E1 F1 M1 Q6 P V1 X0     Version BA4.00
  66.  S00=001 S01=000 S02=043 S03=013 S04=010 S05=008 S06=002 S07=060 S08=002 S09=006
  67.  S10=007 S11=070 S12=050 
  68.  S45=000 S47=004 S48=000 S49=000
  69.  S50=000 S51=005 S52=002 S53=003 S54=001 S55=000 S56=017 S57=019 S58=002 S59=000
  70.  S60=000 S61=000 S62=003 S63=001 S64=000 S65=000 S66=001 S67=000 S68=255 
  71.  S90=000 S91=000 S92=001 S95=000 
  72.  S100=000 S101=000 S102=000 S104=000 
  73.  S110=001 S111=030 S112=001 
  74.  S121=000 
  75.  N0:
  76.  N1:
  77.  N2:
  78.  N3:
  79.  N4:
  80.  N5:
  81.  N6:
  82.  N7:
  83.  N8:
  84.  N9:
  85.  OK
  86.  
  87. And, the following entry is in /etc/gettytab:
  88.  
  89.  #
  90.  # 19200/2400 dialin for Telebit Trailblazer+ modem
  91.  #
  92.  T|T19200:dial-19200:\
  93.          :nx=T2400:sp#19200:
  94.  T2400|dial-2400:\
  95.          :nx=T19200:sp#2400:
  96.  
  97. My chat script dialing command looks like "ATs50=255s111=0DT4515678"
  98. instead of just "ATDT4515678" in order to force a PEP mode connection
  99. and to disable the UUCP spoofing (otherwise, the modem swallows or
  100. delays ^P characters).
  101.  
  102. I run /usr/etc/in.routed on crappie (the calling end) and have this in
  103. my /etc/gateways file:
  104.  
  105.  net 0.0.0.0 gateway remora metric 1 passive
  106.  host crappie gateway crappie metric 0 passive
  107.  
  108. Routed is started in /etc/rc.local.  This way, I don't have to
  109. manually add or delete routes when links come up.  I ifconfig the ppp0
  110. interface on crappie at boot time like this (in /etc/rc.local with the
  111. other ifconfig's):
  112.  
  113.  ifconfig ppp0 crappie remora netmask 0xffffff00 down
  114.  
  115. I put "init ppp_attach" in my /sys/sun4c/conf/CRAPPIE file so that the
  116. above ifconfig down will work:
  117.  
  118.  pseudo-device   ppp1 init ppp_attach # Point-to-Point Protocol, 1 line
  119.  
  120. Routed now keeps my routes sane at the crappie.MorningStar.Com end.
  121.  
  122. My ethernet (le0) and PPP (ppp0) interfaces are configured with the
  123. same address and netmask.  IP is smart enough to figure out (via the
  124. routes in /etc/gateways) that everything useful needs to go out ppp0.
  125. Also, the remora end of my PPP link is configured the same way -- the
  126. ppp0 interface there is configured with the same address and netmask
  127. as remora's le0 ethernet.  This means that separate interface names
  128. like "remora-ppp" are not needed; point-to-point links (whether PPP,
  129. Xerox Synchronous Point-to-Point Protocol, SLIP, IGP or whatever) have
  130. (apparently) been used this (seemingly bizarre) way for some time.
  131. This works because when IP looks at a POINTOPOINT link it ignores the
  132. local address (unlike an ethernet interface) and only looks at the
  133. remote address.
  134.  
  135. Here's what netstat shows for me:
  136.  
  137.  crappie 109% netstat -r
  138.  Routing tables
  139.  Destination          Gateway              Flags    Refcnt Use        Interface
  140.  localhost            localhost            UH       0      0          lo0
  141.  crappie              crappie              UH       1      11339      le0
  142.  default              remora               UG       0      1266       ppp0
  143.  mstar-net-ppp-remora crappie              U        0      0          le0
  144.  crappie 110% netstat -rn
  145.  Routing tables
  146.  Destination          Gateway              Flags    Refcnt Use        Interface
  147.  127.0.0.1            127.0.0.1            UH       0      0          lo0
  148.  137.175.6.3          137.175.6.3          UH       1      11339      le0
  149.  default              137.175.2.7          UG       0      1266       ppp0
  150.  137.175.6.0          137.175.6.3          U        0      0          le0
  151.  crappie 111% 
  152.  
  153. The default route to remora is a result of the first line in the
  154. /etc/gateways file ("default" can't be used there; you have to say
  155. "0.0.0.0").
  156.  
  157. On the network at work, I add a static route in our gateway machine's
  158. /etc/rc.local file:
  159.  
  160.  /usr/etc/route add net 137.175.6 remora 1
  161.  
  162. All the other machines in the office have default routes pointing at
  163. the gateway machine, and all PPP-connected external machines are on the
  164. 137.175.6 subnet.
  165.  
  166. Send me mail or post to the newsgroup comp.protocols.ppp if you have
  167. any questions.
  168.  
  169. Karl Fox <karl@MorningStar.Com>
  170.